Frames No Frames Cognitoware API v2009512
Cognitoware.Robotics.dll
Cognitoware.Mathematics.Data

Structure Pair<T1, T2>
T1: The type contained in the First element.
T2: The type contained in the Second element.


Summary

A structure that holds two elements.

Constructor Summary

Pair(T1, T2)
Create a pair from the two parameter values.

Method Summary

Equals(Object)
Inherited from System.ValueType
Finalize()
Inherited from System.Object
GetHashCode()
Inherited from System.ValueType
GetType()
Inherited from System.Object
MemberwiseClone()
Inherited from System.Object
ToString()
Writes the elements of the pair to a string.

Details

This class is modelled after the 'cons' data structure in Lisp. It is used to group data together that are not grouped together often enough to need a dedicated class. Note that this is a structure and not a class.

Constructor Details

public Pair(T1 t1, T2 t2)
Create a pair from the two parameter values.

Parameters:

t1 - The value to be stored in the First element.
t2 - The value to be stored in the Second element.

Method Details

public override String ToString()
Writes the elements of the pair to a string.

Returns:

A string representation of the pair elements.


Questions, Comments and Licensing
Copyright 2009 Cognitoware. All rights reserved.